package com.jumi.microservice.common.validator.annotation;

import com.jumi.microservice.common.validator.utils.ValidatorUtils;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * @author ssk
 * @create 2020/7/31 16:49
 **/
public class MobileValidator implements ConstraintValidator<Mobile,String> {

    @Override
    public boolean isValid(String value, ConstraintValidatorContext context) {
        return ValidatorUtils.isMobile(value);
    }
}
